package com.example.demo.Component;

import com.example.demo.Model.UserInfo;
import com.example.demo.Services.ServiceController;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public
class UserComponent {
//    @Qualifier("userInfo1")
//    @Autowired
//    private UserInfo userInfo3;
        @Resource(name="userInfo1")
      private UserInfo userInfo3;




    public void say(){
        System.out.println("Component......");
        System.out.println(userInfo3);
    }
}
